import Vue from 'vue'
import App from './App.vue'
import router from './router'
import VueRouter from 'vue-router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/css/reset.css'
import 'ant-design-vue/dist/antd.css' // 使用 vue UI组件库时必须要引入的样式表
import { Button, message, Layout, Menu, Icon, Table, Tag, Divider, Card, Breadcrumb, Form, Input, Select, InputNumber, Upload, Modal, Avatar, Dropdown, Row, Col, List } from 'ant-design-vue'

Vue.use(Button)
  .use(message)
  .use(Layout)
  .use(Menu)
  .use(Icon)
  .use(Table)
  .use(Tag)
  .use(Divider)
  .use(Card)
  .use(Breadcrumb)
  .use(Form)
  .use(Input)
  .use(Select)
  .use(InputNumber)
  .use(Upload)
  .use(Modal)
  .use(Avatar)
  .use(Dropdown)
  .use(Row)
  .use(Col)
  .use(List)
Vue.config.productionTip = false

// 【添加代码】解决vue-router在3.0版本以上重复点路由报错
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.prototype.$confirm = Modal.confirm
Vue.prototype.$message = message

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
